import { reqGetOrderInfo, reqDelOrder } from "@/api"
const state = {
  orderInfo: []
}
const getters = {}
const mutations = {
  GETORDERINFO(state, orderInfo) {
    state.orderInfo = orderInfo
  }
}
const actions = {
  async getOrderInfo({ commit }, phone) {
    let result = await reqGetOrderInfo(phone)
    // console.log(result);
    if (result.status == 200) {
      commit('GETORDERINFO', result.data)
    }
  },
  async delOrder({ commit }, id) {
    let rusult = await reqDelOrder(id)
    console.log(result);
  }
}
export default {
  state,
  mutations,
  getters,
  actions
}